<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 500px;
            height: 500px;
            border: 2px solid black;
            display: flex;
            /* 改成弹性盒 */
            flex-direction: row;
            /* 主轴方向 */
            justify-content: flex-start;
            /* 调整主轴对齐方式 */
            align-items: flex-start;
            /* 调整侧轴对齐方式 */
            flex-wrap: wrap;
            /* 折行 默认等间距 */
            align-content: center  ;
            /* 控制折行后的行间距
            flex-start      
            flex-end        
            center          
            space-between   
            space-around    
            */
        }
        .box span{
            width: 100px;
            height: 100px;
            border: 1px dashed rebeccapurple;
        }
    </style>
</head>
<body>
    <div class="box">
        <span>1111</span>
        <span>2222</span>
        <span>3333</span>
        <span>4444</span>
        <span>5555</span>
        <span>6666</span>
        <span>6666</span>
        <span>6666</span>
        <span>6666</span>
        <span>6666</span>
        <span>6666</span>
    </div>
</body>
</html>